#!/usr/bin/perl
use Encode;
$dir = "C:\\DOCUME~1\\Administrator\\workspace\\smsindex\\data\\dic\\";
$infile1 = "C:\\DOCUME~1\\Administrator\\workspace\\smsindex\\data\\Hindi\\hindi.vocab";
$infile2 = $dir."hindiStopwords";

$outfile = "temp";
open OUT, ">$outfile" or die();
$outfile1 = "temp1";
open OUT1, ">$outfile1" or die();
open(IN1,'<:encoding(utf8)', $infile1) || die();
open(IN2,'<:encoding(utf8)', $infile2) || die();

@a1 = <IN1>;
@a2 = <IN2>;

foreach $l (@a1){
	chomp($l);
	$flag = 1;
	foreach $k (@a2){
		chomp($k);
		if($l eq $k){
			$str = decode_utf8($l." : ".$k);
			print OUT1 $str."\n";
			$flag =0;
			last;
		}			
	}
	if($flag){
	print OUT decode_utf8($l);
	print OUT "\n";}
}
close(OUT);
close(OUT1);